package com.hotel.servertImpl;

import java.util.List;

import com.hotel.Impl.YgDaoImpl;
import com.hotel.dao.YgDao;
import com.hotel.entity.Staff;
import com.hotel.servert.YgServert;

public class YgServertImpl implements YgServert {
     private YgDao y=new YgDaoImpl();

	@Override
	public List<Staff> ygAll() {
		
		return y.ygAll();
	}

	@Override
	public boolean addStaff(Staff staff) {
		int i=y.addStaff(staff);
		if(i>0){
			return true;			
		}
		return false;
	}

	@Override
	public Staff getStaffById(int id) {
	
		return y.getStaffById(id);
	}

	@Override
	public boolean updateYg(Staff staff) {
		int a=y.updateYg(staff);
		if(a>0){
			return true;
		}
		return false;
	}

	@Override
	public boolean deleteStaff(int id) {
		// TODO Auto-generated method stub
		return false;
	}

}
